{template 'public/header'}
{template 'public/comhead'}
<link rel="stylesheet" type="text/css" href="../addons/zh_tcwq/template/public/ygcss.css">
<style type="text/css">
    .yginp{width: 50%;}
    .ygspan{line-height: 35px;margin-left: 10px;}
</style>
<ul class="nav nav-tabs">    
    <span class="ygxian"></span>
    <div class="ygdangq">当前位置:</div>
    <li class="active"><a href="javascript:void(0);">城市代理佣金</a></li>
</ul>
<div class="main">
    <form action="" method="post" class="form-horizontal form" enctype="multipart/form-data" id="invitative">
        <div class="panel panel-default ygdefault">
            <div class="panel-heading wyheader">
                城市代理佣金比例设置
            </div>
            <div class="panel-body">
             
                <div class="form-group">
                    <label class="col-xs-12 col-sm-3 col-md-2 control-label">佣金比例类型</label>
                    <div class="col-sm-9">
                        <select class="col-sm-5" id="type" name="type" autocomplete="off">  
                                <option value="1" {if $item['type']=='1'} selected {/if}>统一模式</option>
                                <option value="2" {if $item['type']=='2'} selected {/if}>分开模式</option>
                        </select>
                    </div>
                </div>
                
                <div class="form-group ygyi2">
                    <label class="col-xs-12 col-sm-3 col-md-2 control-label">佣金比例设置</label>
                    <div class="col-sm-9">
                        <input type="text" name="typer" value="{$item['typer']}" id="web_name" class="form-control yginp col-md-7" placeholder="佣金比例设置" /><span class="ygspan">%</span>
                    </div>
                </div>               
                <div class="form-group ygyi">
                    <label class="col-xs-12 col-sm-3 col-md-2 control-label">商家模块比例</label>
                    <div class="col-sm-9">
                        <input type="text" name="sjper" value="{$item['sjper']}" id="web_name" class="form-control yginp col-md-7" placeholder="商家模块比例" /><span class="ygspan">%</span>
                    </div>
                </div> 
                 <div class="form-group ygyi">
                    <label class="col-xs-12 col-sm-3 col-md-2 control-label">帖子模块比例</label>
                    <div class="col-sm-9">
                        <input type="text" name="tzper" value="{$item['tzper']}" id="web_name" class="form-control yginp col-md-7" placeholder="帖子模块比例" /><span class="ygspan">%</span>
                    </div>
                </div>                               
                <div class="form-group ygyi">
                    <label class="col-xs-12 col-sm-3 col-md-2 control-label">黄页模块比例</label>
                    <div class="col-sm-9">
                        <input type="text" name="hyper" value="{$item['hyper']}" id="web_name" class="form-control yginp col-md-7" placeholder="黄页模块比例"/><span class="ygspan">%</span>
                    </div>
                </div>                
                <div class="form-group ygyi">
                    <label class="col-xs-12 col-sm-3 col-md-2 control-label">审车模块比例</label>
                    <div class="col-sm-9">
                        <input type="text" name="pcper" value="{$item['pcper']}" id="web_name" class="form-control yginp col-md-7" placeholder="审车模块比例" /><span class="ygspan">%</span>
                    </div>
                </div> 

                <div class="form-group ygyi">
                    <label class="col-xs-12 col-sm-3 col-md-2 control-label">代理商普通商品比例</label>
                    <div class="col-sm-9">
                        <input type="text" name="dlsp" value="{$item['dlsp']}" id="web_name" class="form-control yginp col-md-7" placeholder="代理商普通商品比例" /><span class="ygspan">%</span>
                    </div>
                </div> 

                <div class="form-group ygyi">
                    <label class="col-xs-12 col-sm-3 col-md-2 control-label">代理商拼团商品比例</label>
                    <div class="col-sm-9">
                        <input type="text" name="dlpt" value="{$item['dlpt']}" id="web_name" class="form-control yginp col-md-7" placeholder="代理商拼团商品比例" /><span class="ygspan">%</span>
                    </div>
                </div> 

                <div class="form-group ygyi">
                    <label class="col-xs-12 col-sm-3 col-md-2 control-label">代理商砍价商品比例</label>
                    <div class="col-sm-9">
                        <input type="text" name="dlkg" value="{$item['dlkg']}" id="web_name" class="form-control yginp col-md-7" placeholder="代理商砍价商品比例" /><span class="ygspan">%</span>
                    </div>
                </div> 

                <div class="form-group ygyi">
                    <label class="col-xs-12 col-sm-3 col-md-2 control-label">代理商抢购商品比例</label>
                    <div class="col-sm-9">
                        <input type="text" name="dlqg" value="{$item['dlqg']}" id="web_name" class="form-control yginp col-md-7" placeholder="代理商抢购商品比例" /><span class="ygspan">%</span>
                    </div>
                </div> 

                <div class="form-group ygyi">
                    <label class="col-xs-12 col-sm-3 col-md-2 control-label">代理商活动比例</label>
                    <div class="col-sm-9">
                        <input type="text" name="dlhd" value="{$item['dlhd']}" id="web_name" class="form-control yginp col-md-7" placeholder="代理商活动比例" /><span class="ygspan">%</span>
                    </div>
                </div> 

                <div class="form-group ygyi">
                    <label class="col-xs-12 col-sm-3 col-md-2 control-label">商家普通商品比例</label>
                    <div class="col-sm-9">
                        <input type="text" name="spzd" value="{$item['spzd']}" id="web_name" class="form-control yginp col-md-7" placeholder="最低限制" /><span class="ygspan">%</span>

                        <input type="text" name="spmr" value="{$item['spmr']}" id="web_name" class="form-control yginp col-md-7" placeholder="默认比例" /><span class="ygspan" style="float: left;">%</span>
                    </div>
                </div> 

                

                <div class="form-group ygyi">
                    <label class="col-xs-12 col-sm-3 col-md-2 control-label">商家拼团商品比例</label>
                    <div class="col-sm-9">
                          <input type="text" name="ptzd" value="{$item['ptzd']}" id="web_name" class="form-control yginp col-md-7" placeholder="最低限制" /><span class="ygspan">%</span>

                         <input type="text" name="ptmr" value="{$item['ptmr']}" id="web_name" class="form-control yginp col-md-7" placeholder="默认比例" /><span class="ygspan" style="float: left;">%</span>
                    </div>
                </div> 
    


                <div class="form-group ygyi">
                    <label class="col-xs-12 col-sm-3 col-md-2 control-label">商家抢购商品比例</label>
                    <div class="col-sm-9">
                         <input type="text" name="qgzd" value="{$item['qgzd']}" id="web_name" class="form-control yginp col-md-7" placeholder="最低限制" /><span class="ygspan">%</span>

                         <input type="text" name="qgmr" value="{$item['qgmr']}" id="web_name" class="form-control yginp col-md-7" placeholder="默认比例" /><span class="ygspan" style="float: left;">%</span>
                    </div>
                </div> 

                <div class="form-group ygyi">
                    <label class="col-xs-12 col-sm-3 col-md-2 control-label">商家砍价商品比例</label>
                    <div class="col-sm-9">
                         <input type="text" name="kgzd" value="{$item['kgzd']}" id="web_name" class="form-control yginp col-md-7" placeholder="最低限制" /><span class="ygspan">%</span>

                         <input type="text" name="kgmr" value="{$item['kgmr']}" id="web_name" class="form-control yginp col-md-7" placeholder="默认比例" /><span class="ygspan" style="float: left;">%</span>
                    </div>
                </div>


                <div class="form-group ygyi">
                    <label class="col-xs-12 col-sm-3 col-md-2 control-label">商家活动比例</label>
                    <div class="col-sm-9">
                        <input type="text" name="hdzd" value="{$item['hdzd']}" id="web_name" class="form-control yginp col-md-7" placeholder="最低限制" /><span class="ygspan">%</span>

                        <input type="text" name="hdmr" value="{$item['hdmr']}" id="web_name" class="form-control yginp col-md-7" placeholder="默认比例" /><span class="ygspan" style="float: left;">%</span>
                    </div>
                </div>                 
            </div>
        </div>
        
        <div class="form-group">
            <input type="submit" name="submit" value="保存设置" class="btn col-lg-3" style="color: white;background-color: #44ABF7;" />
            <input type="hidden" name="token" value="{$_W['token']}" />
            <input type="hidden" name="id" value="{$item['id']}" />
            <input type="hidden" id="zhi" value="{$item['type']}" />
        </div>
    </form>
</div>
<!-- {template 'common/footer'} -->
<script type="text/javascript">
    $(function(){
        // $(".ygyi").hide();
        // $(".ygyi2").show();  
        // $("select#ygadd").change(function(){
        //     if($(this).val()=='1'){
        //         console.log($(this).val())
        //         $(".ygyi").hide();
        //         $(".ygyi2").show();
        //     }else if($(this).val()=='2'){
        //         console.log($(this).val())
        //         $(".ygyi").show();
        //         $(".ygyi2").hide();
        //     }
        //  })
        "{if $item}"
            "{if $item['type']=='1'}"
                $('.ygyi').hide();
            "{/if}"
            "{if $item['type']=='2'}"
                $('.ygyi2').hide();
            "{/if}"            
        "{else}"
            $('.ygyi').hide();
        "{/if}"
        $('#type').change(function(){
            $('.ygyi').show();
            $('.ygyi2').show();
            if($(this).val() == '1') {
                $('.ygyi').hide();
            }
            if($(this).val() == '2') {
                $('.ygyi2').hide();
            }
        });
        $("#frame-15").show();
        $("#yframe-15").addClass("wyactive");
    })
</script>
{template 'common/footer'}